package com.pbc.gmp.service.impl;


import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.pbc.gmp.commons.utils.PageInfo;
import com.pbc.gmp.model.basemodel.Equipmenttype;
import com.pbc.gmp.dao.EquipmenttypeMapper;
import com.pbc.gmp.service.IEquipmenttypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;


/**
 * <p>
 *   服务实现类
 * </p>
 *
 * @author kjk
 * @since 2018-06-14
 */
@Service
public class EquipmenttypeServiceImpl extends ServiceImpl<EquipmenttypeMapper, Equipmenttype> implements IEquipmenttypeService {

    @Resource(name="equTypeDao")
    private EquipmenttypeMapper equTypeDao;
    @Override
    public void selectEquipmentTypeByDetailWhere(PageInfo pageInfo) {
        Page<Map<String, Object>> page = new Page<Map<String, Object>>(pageInfo.getNowpage(), pageInfo.getSize());
        List<Equipmenttype> list = equTypeDao.selectEquipmentTypeByDetailWhere(page, pageInfo.getCondition());

        pageInfo.setRows(list);
        pageInfo.setTotal(page.getTotal());
    }
}
